<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

    <!--
        定义和用法：anchor()方法用于创建HTML锚 
        该方法返回加了<a>标签的字符串，如下所示：
            <a name="anchorname">string</a>
        语法：string.anchor(name)
    -->
    <a href="" name="myanchor"></a>
    <script>
        var txt = "hello anchor!!!";
        document.write(txt.anchor("myanchor"))
    </script>
    <!-- 简单来讲就是a标签name的js一个参数 -->
</body>

</html>